package com.example.userinfodemo1;

import androidx.appcompat.app.AppCompatActivity;

import android.os.Bundle;
import android.widget.TextView;

public class ShowUserInfoActivity extends AppCompatActivity {

    //定义对象
    private TextView tvName,tvEmail;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_show_user_info);
        //绑定控件
        tvName = findViewById(R.id.tv_name);
        tvEmail = findViewById(R.id.tv_email);
        //获取bundle对象信息
        Bundle bundle = getIntent().getExtras();
        tvName.setText(bundle.getString("name"));
        tvEmail.setText(bundle.getString("email"));

    }
}
